package Day005_API02.ZuoYe;

//char sex = sc.next().charAt(0);
//char sex = sc.next().charAt(0);
//char sex = sc.next().charAt(0);
//char sex = sc.next().charAt(0);
//char sex = sc.next().charAt(0);
//char sex = sc.next().charAt(0);

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("输入学生信息:");
        String s = sc.nextLine();

        s = s.replaceAll(" ","");
        String[] arr = s.split(",");
        String name = arr[0];
        int age = Integer.parseInt(arr[1]);
        char sex = arr[2].charAt(0);

        Student2 stu = new Student2(name,age,sex);
        System.out.println(stu.getName()+stu.getAge()+stu.getSex());
    }
}

class Student2 {
    private String name;
    private int age;
    private char sex;

    public Student2() {
    }

    public Student2(String name, int age, char sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }
}